<template>
	<view class="page-container">	
		<use-navbar ref="navbar" type="custom" :back="false" :bg-color="navbarBgcolor" :title="''">
			<template v-slot:title>
				<view class="tac">
					<text class="fs-34 fwbd ft-white">事项</text>
				</view>
			</template>
			<template v-slot:right>
				<view class="tac trophy" @click='toTrophy'>
					<image src="../../static/icons/icon-trophy.png" class="icon"></image>
				</view>
			</template>
		</use-navbar>
		<web-view style="position: fixed;top:0;left: 0;width: 100vw;height: 100vh;"
			:src="unityWebUrl" full-screen ref="unityWindows"></web-view>
	
	</view>
	<use-tabbar></use-tabbar>
</template>

<script setup>
	// --组合式 API 模板
	import {
		ref
	} from 'vue'
	import {
		onLoad,
		onShow,
	} from "@dcloudio/uni-app";

	const title = ref("标题")

	const unityWebUrl=ref('https://mcda.youerp.cn/web/WebGl/GrowingForest/index.html')
	// onLoad 接受 A 页面传递的参数
	onLoad((option) => {
		console.log("B 页面 onLoad:", option); //B 页面 onLoad: {id: '1', name: 'uniapp'}
		getApp().globalData.tabbarIndex = 2;
		// unityWebUrl.value='http://localhost:8039/WebGl/GrowingForest/index.html?v=1.0.0'
	});

	onShow(() => {
		console.log("B 页面 onShow");
	});
</script>

<style  lang="less" scoped>

</style>
